package com.zzl.study.auth.security.authentication;

import lombok.Data;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

/**
 * @author: zhangzl
 * @date: 2024/3/12 21:03
 * @version: 1.0
 * @description: 自定义授权信息
 */
@Data
public class CustomAuthority implements Transfer<SimpleGrantedAuthority> {

    /**
     * 角色
     */
    private String role;

    @Override
    public SimpleGrantedAuthority transform() {
        return new SimpleGrantedAuthority(this.role);
    }

}
